<?

//获取网站信息
$site=select_one_line_all_items($table_Prefix."site","1 = 1");

//获取板块信息
$plate=select_one_line_all_items($table_Prefix."plate","mid = 'banner' ");


//获取分类
$term=select_lines_all_items($table_Prefix."banner_term","mid asc","publish = 1","");
$term_name_list=transform_2darray_in_1darray_with_new_key($term,"nid","name");


//获取当前的横幅信息
$data=select_one_line_all_items($table_prefix."detail","nid= '".$_REQUEST ['nid']."'");
$trans_nid = $_REQUEST ['nid'];


//当前横幅的分类。需要在data后
$now_banner_term= select_one_line_all_items($table_prefix."banner_term","nid='".$data['banner_term']."'");






//获取最早的一条数据，用来做图片尺寸参考
$img_width_height  = array('', '');
$detail_first      = select_one_line_all_items($table_Prefix . "detail", " belong = 'banner' and publish = 1  order by nid asc ");

$first_icon_data   = $detail_first['icon']   != 'alpha.gif' && $detail_first['icon']   != '' && file_exists((ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['icon'])) == 1 ? getimagesize(ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['icon']) : $img_width_height;
$first_image1_data = $detail_first['image1'] != 'alpha.gif' && $detail_first['image1'] != '' && file_exists((ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image1'])) == 1 ? getimagesize(ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image1']) : $img_width_height;
$first_image2_data = $detail_first['image2'] != 'alpha.gif' && $detail_first['image2'] && file_exists((ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image2'])) == 1 ? getimagesize(ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image2']) : $img_width_height;
$first_image3_data = $detail_first['image3'] != 'alpha.gif' && $detail_first['image3'] && file_exists((ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image3'])) == 1 ? getimagesize(ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image3']) : $img_width_height;
$first_image4_data = $detail_first['image4'] != 'alpha.gif' && $detail_first['image4'] && file_exists((ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image4'])) == 1 ? getimagesize(ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image4']) : $img_width_height;
$first_image5_data = $detail_first['image5'] != 'alpha.gif' && $detail_first['image5'] && file_exists((ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image5'])) == 1 ? getimagesize(ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['image5']) : $img_width_height;
$first_banner_data = $detail_first['banner'] != 'alpha.gif' && $detail_first['banner'] && file_exists((ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['banner'])) == 1 ? getimagesize(ROOT_PATH_ . '/uploadfiles/' . $theme_folder . '/' . $detail_first['banner']) : $img_width_height;

?>






